/**
 * Created by limeng on 16/9/1.
 */
indexApp.controller("HistoryProposalListCtrl", function ($scope, $http, $routeParams, $controller) {
    $controller("ListPageCtrl", {$scope: $scope, $http: $http});
    $scope.title = "历年提案";

    $scope.updateContent = function() {
        $scope.searchMap.pageSize = parseInt($scope.pageSize);
        $scope.searchMap.pageNo = parseInt($scope.pageNo);
        $http.post('/proposal/proposalsByConfigId/'+$routeParams.configId,
            $scope.searchMap).success(function (data) {
            if (data.state == true) {
                $scope.articles = data.list;
                $scope.pageCount = data.pageCount;
            }
        });
    };

    $scope.isProposal = true;
    $(".nav_elem").removeClass("jc_li_selected");
    $("#nav_history").addClass("jc_li_selected");
    $scope.updateContent();
});